package com.transaction.impl;

import org.springframework.jdbc.core.support.JdbcDaoSupport;

import com.transaction.HelloWorld;


public class HelloWorldImpl extends JdbcDaoSupport implements HelloWorld {
	
	public void sayHello() {
		int i=this.getJdbcTemplate().queryForInt("select count(1) from signature ");
		this.getJdbcTemplate().update("update signature set signaturesize=4444 ");
		
		System.out.println(i+":");
		
		//int k=i/0;
		this.getJdbcTemplate().update("update signature set signaturesize=111 ");
		
		System.out.println(String.format("[%s#%d] execute %s at %d", this.getClass().getSimpleName(),
				 hashCode(), "sayHello", System.nanoTime())
				);
	}
}
